﻿/*CREATE TRIGGER [dbo].[CancelacionesCausas_DeletionTrigger] 
    ON [CancelacionesCausas] 
    AFTER DELETE 
AS 
SET NOCOUNT ON 
UPDATE [dbo].[CancelacionesCausas_Tombstone] 
    SET [DeletionDate] = GETUTCDATE() 
    FROM deleted 
    WHERE deleted.[CausaGuid] = [CancelacionesCausas_Tombstone].[CausaGuid] 
IF @@ROWCOUNT = 0 
BEGIN 
    INSERT INTO [dbo].[CancelacionesCausas_Tombstone] 
    ([CausaGuid], DeletionDate)
    SELECT [CausaGuid], GETUTCDATE()
    FROM deleted 
END*/